// 计算swiper的高度样式及切换
export default {
	data() {
		return {
			tabIndex:0,
			indexCurrent:0
		}
	},
	computed: {
		swiperStyle() {
			const otherHeight = this.otherHeight || '0px';
			console.log(otherHeight)
			return `height:calc(100vh - 100rpx - ${this.top} - ${otherHeight})`
		}
	},
	methods: {
		getChange(e){
			const index = e.detail ? e.detail.current : e;
			if(e.hasOwnProperty('detail')&&e.detail.source=='touch') {
				this.indexCurrent = index //切换选项卡样式
				console.log(e,66)
			}
			if(!this.unSetotherHeight) this.otherHeight = this.isFilterFlag ? '318rpx':'128rpx'
		},
		tabGetChange(index){
			this.tabIndex = index; //切换swiper
		}
	},
}